using Microsoft.Maui.Controls;

namespace MauiApp.Views.Controls
{
    // Cross-platform view; native pinch/zoom handled in platform handlers (Android)
    public class ZoomableImage : Image
    {
        public static readonly BindableProperty MinZoomProperty = BindableProperty.Create(
            nameof(MinZoom), typeof(double), typeof(ZoomableImage), 1.0);

        public static readonly BindableProperty MaxZoomProperty = BindableProperty.Create(
            nameof(MaxZoom), typeof(double), typeof(ZoomableImage), 6.0);

        public static readonly BindableProperty DoubleTapZoomProperty = BindableProperty.Create(
            nameof(DoubleTapZoom), typeof(double), typeof(ZoomableImage), 2.0);

        public double MinZoom
        {
            get => (double)GetValue(MinZoomProperty);
            set => SetValue(MinZoomProperty, value);
        }

        public double MaxZoom
        {
            get => (double)GetValue(MaxZoomProperty);
            set => SetValue(MaxZoomProperty, value);
        }

        public double DoubleTapZoom
        {
            get => (double)GetValue(DoubleTapZoomProperty);
            set => SetValue(DoubleTapZoomProperty, value);
        }
    }
}
